#include <iostream>

// class Test final //不能被继承
// {

// };
class Test 
{
public:
    virtual void show()
    {
        std::cout<<"Base"<<std::endl;
    }
};
class Test2 : public Test
{
public:
    void show()override //只能用来修饰子类重写的父类函数
    {
        std::cout<<"Dervied"<<std::endl;
    }
};

int main()
{
    Test *t = new Test2;
    t->show();

    return 0;
}